<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
   <span v-show="b" v-html="msg"></span>
   <span v-show="!b" v-html="abc"></span>
   <button onclick="test()">点我</button>
</div>

<!--引入vue文件-->
<script type="text/javascript" src="js/vue-2.6.12.js"></script>
<script>
    const v=new Vue({
        el:"#app",
        data:{
            msg:"<a href='#'>hello world</a>",
            abc:"hello abc",
            num1:1,
            num2:2,
            b:false
        }
    });
    function test(){
        v.b=!v.b;
    }
</script>
</body>
</html>